package com.gxa.modules.deviceManager.entity;


import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.gxa.modules.deviceManager.form.EquipmentManagementForm;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.io.Serializable;

@Data
@NoArgsConstructor
@TableName("y_equipment_management")
public class EquipmentManagement implements Serializable {
    @TableId(value = "id",type = IdType.AUTO)
    private Integer id;
    @TableField("equipment_classify")
    private String equipmentClassify;
    @TableField("equipment_name")
    private String equipmentName;
    @TableField("equipment_number")
    private String equipmentNumber;
    @TableField("brand_model")
    private String brandModel;
    private String area;
    @TableField("equipment_status")
    private String equipmentStatus;
    private String maintainer;
    private String note;
    @TableField("community_id")
    private Integer communityId;

    public EquipmentManagement(EquipmentManagementForm equipmentManagementForm) {
        this.id = equipmentManagementForm.getId();
        this.equipmentClassify = equipmentManagementForm.getEquipmentClassify();
        this.equipmentName = equipmentManagementForm.getEquipmentName();
        this.equipmentNumber = equipmentManagementForm.getEquipmentNumber();
        this.brandModel = equipmentManagementForm.getBrandModel();
        this.area = equipmentManagementForm.getArea();
        this.equipmentStatus = equipmentManagementForm.getEquipmentStatus();
        this.maintainer = equipmentManagementForm.getMaintainer();
        this.note = equipmentManagementForm.getNote();
        this.communityId = equipmentManagementForm.getCommunityId();

    }
}
